home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- // Creation Date: April 1999
- //
- // This routine contains the names of the plug-ins that contain
- // functionality that is a core part of Maya. If those plug-in
- // are installed, we want to "autoload" them the first time this
- // release of Maya is started.
- //
- // If customer's subsequently decide they don't want to have
- // those plug-ins autoloaded, they can disable the autoload via
- // Maya's plug-in manager.
- //
- // This code is very specific to the installation setup of a
- // particular Maya release, you probably should not fiddle
- // with it without consulting the release engineering team first.
-
- global proc initialPluginLoad()
- {
- string $mayaPlugInPath = `getenv MAYA_PLUG_IN_PATH`;
- string $pluginAutoloadList[] = { };
-
- // List of plug-ins introduced with 3.0
- if ( ! `optionVar -exists oneTimeUnlimitedPluginLoad30` ) {
- optionVar -iv oneTimeUnlimitedPluginLoad30 1;
-
- string $licenseType = `about -p`;
-
- // Do not erase pre 3.0 setup if there is
- // one. oneTimeUnlimitedPluginLoad was the optionvar used
- // then.
- if (! `optionVar -exists oneTimeUnlimitedPluginLoad` )
- {
- string $defaultPlugins[] = {
- "rotateHelper",
- "ik2Bsolver"
- };
- $pluginAutoloadList = AWAppendStringsToStringArray (
- $defaultPlugins,
- $pluginAutoloadList);
-
- $licenseType = match("Unlimited", $licenseType);
- if ( $licenseType == "Unlimited" ) {
- string $UnlimitedPlugins[] = {
- "CpClothPlugin",
- "Fur",
- "mayalive"
- };
- $pluginAutoloadList = AWAppendStringsToStringArray (
- $UnlimitedPlugins, $pluginAutoloadList);
- }
- }
-
- }
-
- // List of plug-ins introduced with 5.0
- if ( ! `optionVar -exists oneTimeDefaultPluginLoad50` ) {
- optionVar -iv oneTimeDefaultPluginLoad50 1;
-
- string $defaultPlugins[] = {
- "Mayatomr",
- "VectorRender"
- };
-
- $pluginAutoloadList = AWAppendStringsToStringArray (
- $defaultPlugins,
- $pluginAutoloadList);
-
- }
-
-
- if ( size($pluginAutoloadList)>0 ) {
-
- string $pluginPaths[];
- string $extension;
- string $fileName;
-
- if (`about -nt`) {
- $extension = ".mll";
- tokenize $mayaPlugInPath ";" $pluginPaths;
- } else if (`about -mac`) {
- $extension = ".lib";
- tokenize $mayaPlugInPath ";" $pluginPaths;
- } else
- {
- $extension = ".so";
- tokenize $mayaPlugInPath ":" $pluginPaths;
- }
-
- for ( $pluginName in $pluginAutoloadList ) {
- if ( ! `pluginInfo -query -loaded $pluginName` ) {
- for ( $pluginDirectory in $pluginPaths ) {
- $fileName = $pluginDirectory
- + "/"
- + $pluginName
- + $extension;
-
- // If the plug-in file exists, we will try to load it
- // Use the -r test instead of -x. -x on Windows only
- // checks the file extension, and won't return true on
- // a file with a .mll extension.
- // delay plugin load until necessary libraries are loaded
- if ( `filetest -r $fileName` ) {
- string $cmdAutoLoad = "autoLoadPlugin(\"\", \""
- + $pluginName
- + "\", \""
- + $pluginName
- + "\")";
- evalDeferred($cmdAutoLoad);
-
- // stop searching after we find the first match.
- break;
- }
- }
- }
- }
- }
- }
-